home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Softdisk Supreme
/
Softdisk Supreme.iso
/
pc
/
DSK Files
/
0-49
/
SD010b.dsk
/
LABEL PRINTER V1.1.bas
< prev
next >
Wrap
BASIC Source File
|
2003-06-12
|
7KB
|
178 lines
10 REM *****************
20 REM * *
30 REM * LABEL PRINTER *
40 REM * *
50 REM * BY *
60 REM * *
70 REM * RON FOLDEN *
80 REM * *
90 REM *****************
100 REM
110 REM VERSION 1.1, REVISED 1/20/82, APPLESOFT, PARSHALL, N.D., 58770
113 PN$ = "LABEL PRINTER V1.1"
115 PRINT CHR$(4);"PR#0"
120 FOR A = 768 TO 798: READ B: POKE A,B: NEXT A
130 DATA 169,16,141,242,3,169,3,141,243,3,73,165,141,244,3,96,104,168,104,166,214,154,72,152,72,32,234,3,76,18,212
140 ONERR GOTO 10580
150 DIM SM$(20),IN$(20)
160 GOTO 8000
999 REM ******************
1000 REM *** ENTER COPY ***
1001 REM ******************
1010 START = 1:UPPER = 1:LEFT = 1
1020 HOME : IF MENU = 1 AND Q = 2 THEN EDIT = 1
1030 GOSUB 7500: POKE 51,161
1040 HOME : VTAB (VT -1): HTAB (39 -CHARS): FOR DASH = 1 TO CHARS: PRINT "-";: NEXT DASH
1045 VTAB (VT -1): HTAB (39 -(CHARS/2)): PRINT "+"
1050 FOR LINE = UPPER TO LOWER: VTAB (VT +LINE -1): HTAB (38 -CHARS): PRINT "!";: HTAB (39): PRINT "!": NEXT LINE
1060 HTAB (39 -CHARS): FOR DASH = 1 TO CHARS: PRINT "-";: NEXT DASH
1065 IF EDIT = 1 THEN GOSUB 3000
1070 VTAB (VT): FOR LINE = UPPER TO LOWER: IF EDIT < >1 THEN IN$(LINE) = " "
1080 HTAB (39): PRINT "!";: HTAB (38 -CHARS)
1090 IN$ = "": CALL -662
1100 FOR I = 512 TO 767
1110 X = PEEK(I) -128
1120 IF X = 13 THEN 1150
1130 IN$ = IN$ + CHR$(X)
1140 IN$(LINE) = IN$: NEXT I
1150 VTAB (VT +LINE -1): HTAB (39 -CHARS): PRINT IN$(LINE);: HTAB (39): PRINT "!": NEXT LINE
1160 RT = 21: GOSUB 6200:EDIT = 0: GOTO 8000
1999 REM ************************
2000 REM *** PRINT TEST LABEL ***
2001 REM ************************
2010 TEST = 1: GOTO 4000
2999 REM *************************
3000 REM *** EDIT COPY ROUTINE ***
3001 REM *************************
3010 VTAB (VT)
3020 FOR LINE = UPPER TO LOWER
3030 HTAB (39 -CHARS): PRINT IN$(LINE)
3040 NEXT LINE
3050 VTAB (21): HTAB (11): PRINT "ENTER NEW LINE OR": PRINT : HTAB (6): PRINT "PRESS <RETURN> FOR NEXT LINE"
3060 RETURN
3999 REM ********************
4000 REM *** PRINT LABELS ***
4001 REM ********************
4010 Y = CHARS +3
4020 HOME : VTAB (10): INPUT "HOW MANY LABELS ACROSS PAGE? ";A$:ROWS = VAL(A$)
4030 IF TEST = 1 THEN FINISH = 1: GOTO 4060
4040 PRINT : INPUT "HOW MANY LABELS WOULD YOU LIKE? ";A$:FINISH = VAL(A$)
4050 FINISH = INT((FINISH/ROWS) +.5)
4060 RIGHT = ROWS
4070 GOSUB 6000: GOSUB 7000: GOSUB 6100:TEST = 0: GOTO 8000
4999 REM ***************************
5000 REM *** ENDING ROUTINE MENU ***
5001 REM ***************************
5005 ONERR GOTO 10580
5010 SM = 3
5020 SM$(1) = "RESTART PROGRAM"
5030 SM$(2) = "BOOT ANOTHER DISK"
5040 SM$(3) = "QUIT"
5050 MN$ = " END OF PROGRAM ":X$ = "X": GOSUB 10500
5060 ON Q GOTO 8000,9000,30000
5999 REM **************************
6000 REM *** INITIALIZE PRINTER ***
6001 REM **************************
6010 IF IDS = 1 THEN 6040
6020 HOME : VTAB (10): INPUT "WHICH SLOT IS PRINTER CARD IN? ";A$:SLOT = VAL(A$)
6025 IF SLOT <1 OR SLOT >7 THEN PRINT CHR$(7): GOTO 6020
6030 PRINT : HTAB (8): PRINT "ALIGN PAPER FOR PRINTOUT":IDS = 1
6040 RT = 17: GOSUB 6200
6050 PRINT CHR$(4);"PR#";SL
6060 RETURN
6099 REM ************************
6100 REM *** TURN PRINTER OFF ***
6101 REM ************************
6110 PRINT CHR$(4);"PR#0"
6120 RETURN
6199 REM ****************************
6200 REM *** PRESS RETURN ROUTINE ***
6201 REM ****************************
6210 POKE -16368,0: VTAB (RT): CALL -958: HTAB (8): PRINT "PRESS ";: INVERSE : PRINT "<RETURN>";: NORMAL : PRINT " TO CONTINUE"
6220 IF PEEK( -16384) < >141 THEN 6220
6230 POKE -16368,0: RETURN
6999 REM : ********************
7000 REM : *** PRINT LABELS ***
7001 REM : ********************
7010 FOR LABEL = START TO FINISH
7020 FOR LINE = UPPER TO LOWER
7030 FOR COLUMN = LEFT TO RIGHT
7040 PRINT IN$(LINE); SPC( Y - LEN(IN$(LINE)))
7050 NEXT COLUMN: PRINT
7060 NEXT LINE: PRINT
7065 IF (FINISH -LABEL) <ROWS THEN RIGHT = RIGHT -1
7070 NEXT LABEL: RETURN
7499 REM ******************
7500 REM *** LABEL SIZE ***
7501 REM ******************
7505 IF EDIT = 1 THEN RETURN
7510 MN$ = "LABEL SIZE"
7520 SM = 3
7530 SM$(1) = "15/16 X 3-1/2"
7540 SM$(2) = "1-7/16 X 4"
7550 SM$(3) = "2-7/8 X 3-7/8"
7560 SEL$ = "WHAT SIZE ARE YOUR LABELS?"
7570 MENU = 2: GOSUB 10500
7580 SIZE = Q
7590 IF SIZE = 1 THEN LOWER = 5:CHARS = 34:VT = 9: RETURN
7600 IF SIZE = 2 THEN LOWER = 8:CHARS = 37:VT = 7: RETURN
7610 IF SIZE = 3 THEN LOWER = 17:CHARS = 36:VT = 2: RETURN
7999 REM ****************************
8000 REM *** INITIALIZE MAIN MENU ***
8001 REM ****************************
8010 SM = 5
8020 MN$ = "LABEL PRINTER"
8030 SM$(1) = "ENTER COPY"
8040 SM$(2) = "EDIT COPY"
8050 SM$(3) = "PRINT TEST LABEL"
8060 SM$(4) = "PRINT LABELS"
8070 SM$(5) = "QUIT"
8080 X$ = "X"
8090 SEL$ = "< ENTER YOUR SELECTION >"
8100 MENU = 1
8110 GOSUB 10500
8120 ON Q GOTO 1000,1000,2000,4000,5000
8999 REM **************
9000 REM *** REBOOT ***
9001 REM **************
9010 D$ = CHR$(13) + CHR$(4):ERR = PEEK(222)
9020 ONERR GOTO 9070
9030 HOME : VTAB (8): HTAB (11): PRINT "INSERT ANOTHER DISK": PRINT : HTAB (19): PRINT "THEN"
9040 RT = 12: GOSUB 6200
9050 PRINT D$;"VERIFY ";PN$
9060 HOME : VTAB (10): HTAB (9): PRINT "THIS IS THE SAME DISK!!":RT = 12: GOSUB 6200: POKE 216,0: GOTO 5000
9070 PRINT D$;"PR#6"
10499 REM ********************
10500 REM *** MENU ROUTINE ***
10501 REM ********************
10502 IF MENU < >1 GOTO 10515
10503 GOTO 10506
10504 FOR X = 1 TO 40: PRINT X$;: NEXT X: RETURN
10506 HOME : GOSUB 10504
10508 FOR X = 2 TO 21: VTAB (X): PRINT X$;: HTAB (40): PRINT X$: NEXT X
10510 VTAB (22): GOSUB 10504
10515 VTAB (3): HTAB (20 - LEN(MN$)/2): PRINT MN$
10518 IF MENU < >1 GOTO 10525
10520 PRINT : GOSUB 10504
10525 VTAB (7): HTAB (4): PRINT "YOUR SELECTIONS ARE:"
10530 V = 9:HH = 11:HT = 14: FOR I = 1 TO SM
10535 VTAB (V +I): HTAB (HH): PRINT I;". ";SM$(I): NEXT I
10537 PRINT : PRINT : HTAB (20 - LEN(SEL$)/2): PRINT SEL$
10540 Q = PEEK( -16384): IF Q <127 THEN 10540
10545 POKE -16368,0:Q = Q -176: IF Q <1 OR Q >SM THEN PRINT CHR$(7);: GOTO 10540
10550 VTAB (V +Q): HTAB (HT): INVERSE : PRINT SM$(Q)
10555 NORMAL :QQ = PEEK( -16384): IF QQ <127 THEN 10555
10560 POKE -16368,0: IF QQ = 141 THEN 10575
10565 QQ = QQ -176: IF QQ <1 OR QQ >SM THEN PRINT CHR$(7): GOTO 10550
10570 VTAB (V +Q): HTAB (HT): PRINT SM$(Q):Q = QQ: GOTO 10550
10575 RETURN
10580 GOSUB 6100
10584 EN = PEEK(222):LN = PEEK(218) + PEEK(219) *256
10585 IF EN = 255 THEN PRINT CHR$(7);: POKE -16368,0
10590 IF LN = 10540 THEN GOTO 10540
10595 IF LN = 10555 THEN GOTO 10555
20000 HOME : VTAB (10): PRINT "ERROR NO. "EN: PRINT "IN LINE NO. "LN: END
29999 REM ***********
30000 REM *** END ***
30001 REM ***********
30010 HOME : VTAB (10): HTAB (15): PRINT "NORMAL EOJ": VTAB (23): END